#!/usr/bin/python
# -*- coding: utf-8 -*-

import random
Cards = []
Type = ['diamond','spade','heart','club']                     # 牌面花色序列
Num = ['1','2','3','4','5','6','7','8','9','10','J','Q','K']  # 牌面数字序列

for i in Type:                                                # 循环取花色数字生成扑克牌
    for k in Num:
        Card = i+k
        Cards.append(Card)                                    # 生成的扑克牌添加至扑克牌序列末尾
Cards.append('black Joker')                                   # 添加小王
Cards.append('red Joker')                                     # 添加大王
random.shuffle(Cards)                                         # 洗牌
for n in range(1,4):                                          # 留3张牌,扑克牌序列中删除后3张
    del Cards[-1]

player1 = [j for j in Cards if (Cards.index(j)+1) % 3 == 1]   # 玩家1得到的为扑克牌序列脚标对3取模为1
player2 = [j for j in Cards if (Cards.index(j)+1) % 3 == 2]   # 玩家2得到的为扑克牌序列脚标对3取模为2
player3 = [j for j in Cards if (Cards.index(j)+1) % 3 == 0]   # 玩家3得到的为扑克牌序列脚标对3取模为0
print 'player1\'s Cards:', player1                            # 输出玩家1卡牌
print 'player2\'s Cards:', player2                            # 输出玩家2卡牌
print 'player3\'s Cards:', player3                            # 输出玩家3卡牌